package com.cskaoyan.day14;

public class TestClass {
    public static void main(String[] args) {
        String s1;
        System.out.println("judgeSameType(new Aa(),new Aa()) = " + judgeSameType(new Aa(), new Aa()));
        System.out.println("judgeSameType(new Aa(),new Bb()) = " + judgeSameType(new Aa(), new Bb()));
        System.out.println("judgeSameType(new Bb(),new Bb()) = " + judgeSameType(new Bb(), new Bb()));
        System.out.println("judgeSameType(new Bb(),new Cc()) = " + judgeSameType(new Bb(), new Cc()));
    }
    static boolean   judgeSameType(Object o1,Object o2){
        return o1.getClass()==o2.getClass();
    }
}

class  Aa{

}

class Bb{

}
class Cc extends Aa{

}

